home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1993-02-23 | 6.8 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Tue Feb 23 00:32:09 1993, modified Tue Feb 23 00:32:09 1993, creator Think C, type ASCII, 6305 bytes "PsychometricFit.c" , at 0x1921 382 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 11 50 73 79 63 68 6f | 6d 65 74 72 69 63 46 69 |..Psycho|metricFi|
|00000010| 74 2e 63 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |t.c.....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 01 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 18 a1 00 | 00 01 7e a7 af 67 59 a7 |........|..~..gY.|
|00000060| af 67 59 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.gY.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 56 5d 00 00 |........|....V]..|
|00000080| 2f 2a 20 0d 50 73 79 63 | 68 6f 6d 65 74 72 69 63 |/* .Psyc|hometric|
|00000090| 46 69 74 2e 63 0d 43 6f | 70 79 72 69 67 68 74 20 |Fit.c.Co|pyright |
|000000a0| 31 39 39 30 20 28 63 29 | 20 44 65 6e 69 73 20 47 |1990 (c)| Denis G|
|000000b0| 2e 20 50 65 6c 6c 69 0d | 41 20 67 65 6e 65 72 61 |. Pelli.|A genera|
|000000c0| 6c 2d 70 75 72 70 6f 73 | 65 20 66 75 6e 63 74 69 |l-purpos|e functi|
|000000d0| 6f 6e 20 74 68 61 74 20 | 64 6f 65 73 20 61 20 6d |on that |does a m|
|000000e0| 61 78 69 6d 75 6d 20 6c | 69 6b 65 6c 69 68 6f 6f |aximum l|ikelihoo|
|000000f0| 64 20 66 69 74 20 6f 66 | 20 61 6e 79 20 70 73 79 |d fit of| any psy|
|00000100| 63 68 6f 6d 65 74 72 69 | 63 0d 66 75 6e 63 74 69 |chometri|c.functi|
|00000110| 6f 6e 20 74 6f 20 70 73 | 79 63 68 6f 6d 65 74 72 |on to ps|ychometr|
|00000120| 69 63 20 64 61 74 61 2e | 20 54 68 65 20 72 65 74 |ic data.| The ret|
|00000130| 75 72 6e 65 64 20 76 61 | 6c 75 65 20 69 73 20 74 |urned va|lue is t|
|00000140| 68 65 20 6c 65 76 65 6c | 20 6f 66 20 73 69 67 6e |he level| of sign|
|00000150| 69 66 69 63 61 6e 63 65 | 0d 61 74 20 77 68 69 63 |ificance|.at whic|
|00000160| 68 20 74 68 65 20 66 69 | 74 20 63 61 6e 20 62 65 |h the fi|t can be|
|00000170| 20 72 65 6a 65 63 74 65 | 64 2e 20 54 68 65 20 64 | rejecte|d. The d|
|00000180| 65 67 72 65 65 73 4f 66 | 46 72 65 65 64 6f 6d 20 |egreesOf|Freedom |
|00000190| 6d 61 79 20 62 65 20 7a | 65 72 6f 2c 20 69 6e 20 |may be z|ero, in |
|000001a0| 77 68 69 63 68 20 63 61 | 73 65 20 0d 6e 6f 20 70 |which ca|se .no p|
|000001b0| 61 72 61 6d 65 74 65 72 | 73 0d 77 69 6c 6c 20 62 |arameter|s.will b|
|000001c0| 65 20 61 64 6a 75 73 74 | 65 64 2c 20 62 75 74 20 |e adjust|ed, but |
|000001d0| 79 6f 75 27 6c 6c 20 67 | 65 74 20 74 68 65 20 6c |you'll g|et the l|
|000001e0| 6f 67 20 6c 69 6b 65 6c | 69 68 6f 6f 64 20 61 6e |og likel|ihood an|
|000001f0| 64 20 73 69 67 6e 69 66 | 69 63 61 6e 63 65 20 6f |d signif|icance o|
|00000200| 66 20 74 68 65 20 73 75 | 70 70 6c 69 65 64 0d 70 |f the su|pplied.p|
|00000210| 61 72 61 6d 65 74 65 72 | 20 76 61 6c 75 65 73 2e |arameter| values.|
|00000220| 0d 0d 54 68 65 20 70 73 | 79 63 68 6f 6d 65 74 72 |..The ps|ychometr|
|00000230| 69 63 20 66 75 6e 63 74 | 69 6f 6e 20 28 77 68 69 |ic funct|ion (whi|
|00000240| 63 68 20 79 6f 75 20 73 | 75 70 70 6c 79 20 61 73 |ch you s|upply as|
|00000250| 20 61 6e 20 61 72 67 75 | 6d 65 6e 74 29 20 74 61 | an argu|ment) ta|
|00000260| 6b 65 73 20 74 77 6f 20 | 61 72 67 75 6d 65 6e 74 |kes two |argument|
|00000270| 73 3a 0d 61 20 63 6f 6e | 74 72 61 73 74 20 61 6e |s:.a con|trast an|
|00000280| 64 20 61 20 70 6f 69 6e | 74 65 72 20 74 6f 20 61 |d a poin|ter to a|
|00000290| 20 70 61 72 61 6d 52 65 | 63 6f 72 64 2e 0d 54 68 | paramRe|cord..Th|
|000002a0| 65 20 66 75 6e 63 74 69 | 6f 6e 20 57 65 69 62 75 |e functi|on Weibu|
|000002b0| 6c 6c 28 29 20 69 73 20 | 70 72 6f 76 69 64 65 64 |ll() is |provided|
|000002c0| 20 69 6e 20 57 65 69 62 | 75 6c 6c 2e 63 2e 20 4f | in Weib|ull.c. O|
|000002d0| 74 68 65 72 73 20 6d 61 | 79 20 62 65 20 61 64 64 |thers ma|y be add|
|000002e0| 65 64 20 61 73 20 64 65 | 73 69 72 65 64 2e 0d 49 |ed as de|sired..I|
|000002f0| 74 20 69 73 20 61 73 73 | 75 6d 65 64 20 74 68 61 |t is ass|umed tha|
|00000300| 74 20 74 68 65 20 66 69 | 72 73 74 20 70 61 72 61 |t the fi|rst para|
|00000310| 6d 65 74 65 72 20 69 73 | 20 74 68 65 20 6c 6f 67 |meter is| the log|
|00000320| 20 6f 66 20 74 68 72 65 | 73 68 6f 6c 64 2e 20 4e | of thre|shold. N|
|00000330| 6f 20 61 73 73 75 6d 70 | 74 69 6f 6e 73 20 61 72 |o assump|tions ar|
|00000340| 65 0d 6d 61 64 65 20 61 | 62 6f 75 74 20 74 68 65 |e.made a|bout the|
|00000350| 20 6f 74 68 65 72 20 70 | 61 72 61 6d 65 74 65 72 | other p|arameter|
|00000360| 73 2c 20 65 78 63 65 70 | 74 20 74 68 61 74 20 61 |s, excep|t that a|
|00000370| 6e 79 20 74 68 61 74 20 | 61 72 65 20 74 6f 20 62 |ny that |are to b|
|00000380| 65 20 69 74 65 72 61 74 | 69 76 65 6c 79 20 66 69 |e iterat|ively fi|
|00000390| 74 20 61 72 65 0d 61 73 | 73 75 6d 65 64 20 74 6f |t are.as|sumed to|
|000003a0| 20 62 65 20 6f 66 20 74 | 79 70 65 20 22 64 6f 75 | be of t|ype "dou|
|000003b0| 62 6c 65 22 2e 0d 0d 51 | 75 69 63 6b 33 20 69 73 |ble"...Q|uick3 is|
|000003c0| 20 61 20 73 74 61 6e 64 | 2d 61 6c 6f 6e 65 20 70 | a stand|-alone p|
|000003d0| 72 6f 67 72 61 6d 20 74 | 68 61 74 20 75 73 65 73 |rogram t|hat uses|
|000003e0| 20 50 73 79 63 68 6f 6d | 65 74 72 69 63 46 69 74 | Psychom|etricFit|
|000003f0| 28 29 20 74 6f 20 64 6f | 20 74 68 65 20 72 65 61 |() to do| the rea|
|00000400| 6c 20 77 6f 72 6b 2e 0d | 49 20 73 75 67 67 65 73 |l work..|I sugges|
|00000410| 74 20 79 6f 75 20 72 65 | 61 64 20 74 68 65 20 69 |t you re|ad the i|
|00000420| 6e 74 72 6f 64 75 63 74 | 6f 72 79 20 63 6f 6d 6d |ntroduct|ory comm|
|00000430| 65 6e 74 73 20 61 74 20 | 74 68 65 20 62 65 67 69 |ents at |the begi|
|00000440| 6e 6e 69 6e 67 20 6f 66 | 20 51 75 69 63 6b 33 2e |nning of| Quick3.|
|00000450| 63 0d 0d 48 49 53 54 4f | 52 59 3a 0d 34 2f 37 2f |c..HISTO|RY:.4/7/|
|00000460| 39 30 09 09 64 67 70 20 | 77 72 6f 74 65 20 69 74 |90..dgp |wrote it|
|00000470| 0d 31 30 2f 32 39 2f 39 | 30 09 64 67 70 09 74 69 |.10/29/9|0.dgp.ti|
|00000480| 64 69 65 64 20 75 70 20 | 74 68 65 20 63 6f 6d 6d |died up |the comm|
|00000490| 65 6e 74 73 0d 31 31 2f | 31 37 2f 39 32 09 64 67 |ents.11/|17/92.dg|
|000004a0| 70 20 22 0d 31 2f 32 35 | 2f 39 33 20 64 67 70 20 |p ".1/25|/93 dgp |
|000004b0| 72 65 6d 6f 76 65 64 20 | 6f 62 73 6f 6c 65 74 65 |removed |obsolete|
|000004c0| 20 73 75 70 70 6f 72 74 | 20 66 6f 72 20 54 48 49 | support| for THI|
|000004d0| 4e 4b 20 43 20 34 2e 0d | 0d 53 4f 55 52 43 45 53 |NK C 4..|.SOURCES|
|000004e0| 3a 0d 51 75 69 63 6b 33 | 2e 68 0d 4c 6f 67 4c 69 |:.Quick3|.h.LogLi|
|000004f0| 6b 65 6c 69 68 6f 6f 64 | 2e 63 0d 4d 6f 6e 6f 74 |kelihood|.c.Monot|
|00000500| 6f 6e 69 63 46 69 74 2e | 63 0d 50 73 79 63 68 6f |onicFit.|c.Psycho|
|00000510| 6d 65 74 72 69 63 46 69 | 74 2e 63 0d 53 6f 72 74 |metricFi|t.c.Sort|
|00000520| 41 6e 64 4d 65 72 67 65 | 43 6f 6e 74 72 61 73 74 |AndMerge|Contrast|
|00000530| 73 2e 63 0d 57 65 69 62 | 75 6c 6c 2e 63 0d 23 46 |s.c.Weib|ull.c.#F|
|00000540| 72 6f 6d 20 44 65 6e 69 | 73 20 50 65 6c 6c 69 27 |rom Deni|s Pelli'|
|00000550| 73 20 56 69 64 65 6f 54 | 6f 6f 6c 62 6f 78 3a 0d |s VideoT|oolbox:.|
|00000560| 56 69 64 65 6f 54 6f 6f | 6c 62 6f 78 2e 68 0d 42 |VideoToo|lbox.h.B|
|00000570| 69 6e 6f 6d 69 61 6c 2e | 63 0d 43 68 69 53 71 75 |inomial.|c.ChiSqu|
|00000580| 61 72 65 2e 63 0d 4d 79 | 46 67 65 74 73 2e 63 0d |are.c.My|Fgets.c.|
|00000590| 4e 6f 72 6d 61 6c 2e 63 | 0d 53 65 74 46 69 6c 65 |Normal.c|.SetFile|
|000005a0| 49 6e 66 6f 2e 63 09 09 | 23 20 55 73 65 64 20 6f |Info.c..|# Used o|
|000005b0| 6e 6c 79 20 6f 6e 20 74 | 68 65 20 4d 61 63 69 6e |nly on t|he Macin|
|000005c0| 74 6f 73 68 0d 23 46 72 | 6f 6d 20 4e 75 6d 65 72 |tosh.#Fr|om Numer|
|000005d0| 69 63 61 6c 20 52 65 63 | 69 70 65 73 20 69 6e 20 |ical Rec|ipes in |
|000005e0| 43 3a 0d 6e 72 2e 68 0d | 4e 52 55 54 49 4c 2e 68 |C:.nr.h.|NRUTIL.h|
|000005f0| 0d 42 52 45 4e 54 2e 43 | 0d 46 31 44 49 4d 2e 43 |.BRENT.C|.F1DIM.C|
|00000600| 0d 4c 49 4e 4d 49 4e 2e | 43 0d 4d 4e 42 52 41 4b |.LINMIN.|C.MNBRAK|
|00000610| 2e 43 0d 4e 52 55 54 49 | 4c 2e 43 0d 50 4f 57 45 |.C.NRUTI|L.C.POWE|
|00000620| 4c 4c 2e 43 0d 0d 4c 49 | 4d 49 54 41 54 49 4f 4e |LL.C..LI|MITATION|
|00000630| 53 0d 0d 54 68 69 73 20 | 70 72 6f 67 72 61 6d 20 |S..This |program |
|00000640| 75 73 65 73 20 72 6f 75 | 74 69 6e 65 73 20 66 72 |uses rou|tines fr|
|00000650| 6f 6d 20 4e 75 6d 65 72 | 69 63 61 6c 20 52 65 63 |om Numer|ical Rec|
|00000660| 69 70 65 73 20 69 6e 20 | 43 2e 20 54 68 65 79 27 |ipes in |C. They'|
|00000670| 72 65 20 63 6f 70 79 72 | 69 67 68 74 65 64 2c 20 |re copyr|ighted, |
|00000680| 0d 73 6f 20 49 20 63 61 | 6e 27 74 20 64 69 73 74 |.so I ca|n't dist|
|00000690| 72 69 62 75 74 65 20 74 | 68 65 6d 2e 20 59 6f 75 |ribute t|hem. You|
|000006a0| 20 63 61 6e 20 6f 72 64 | 65 72 20 74 68 65 20 73 | can ord|er the s|
|000006b0| 6f 66 74 77 61 72 65 3a | 0d 09 4e 75 6d 65 72 69 |oftware:|..Numeri|
|000006c0| 63 61 6c 20 52 65 63 69 | 70 65 73 20 43 20 44 69 |cal Reci|pes C Di|
|000006d0| 73 6b 65 74 74 65 20 66 | 6f 72 20 4d 61 63 69 6e |skette f|or Macin|
|000006e0| 74 6f 73 68 20 24 32 39 | 2e 39 35 0d 61 6e 64 20 |tosh $29|.95.and |
|000006f0| 62 6f 6f 6b 3a 0d 09 4e | 75 6d 65 72 69 63 61 6c |book:..N|umerical|
|00000700| 20 52 65 63 69 70 65 73 | 20 69 6e 20 43 3a 20 54 | Recipes| in C: T|
|00000710| 68 65 20 41 72 74 20 6f | 66 20 53 63 69 65 6e 74 |he Art o|f Scient|
|00000720| 69 66 69 63 20 43 6f 6d | 70 75 74 69 6e 67 20 24 |ific Com|puting $|
|00000730| 34 34 2e 35 30 0d 66 72 | 6f 6d 3a 0d 09 43 61 6d |44.50.fr|om:..Cam|
|00000740| 62 72 69 64 67 65 20 55 | 6e 69 76 65 72 73 69 74 |bridge U|niversit|
|00000750| 79 20 50 72 65 73 73 0d | 09 4f 72 64 65 72 20 44 |y Press.|.Order D|
|00000760| 65 70 61 72 74 6d 65 6e | 74 0d 09 35 31 30 20 4e |epartmen|t..510 N|
|00000770| 6f 72 74 68 20 41 76 65 | 6e 75 65 0d 09 4e 65 77 |orth Ave|nue..New|
|00000780| 20 52 6f 63 68 65 6c 6c | 65 2c 20 4e 59 20 31 30 | Rochell|e, NY 10|
|00000790| 38 30 31 0d 0d 4e 6f 74 | 65 20 74 68 61 74 20 49 |801..Not|e that I|
|000007a0| 20 68 61 76 65 20 6d 61 | 64 65 20 73 65 76 65 72 | have ma|de sever|
|000007b0| 61 6c 20 63 68 61 6e 67 | 65 73 20 74 6f 20 74 68 |al chang|es to th|
|000007c0| 65 20 4e 75 6d 65 72 69 | 63 61 6c 20 52 65 63 69 |e Numeri|cal Reci|
|000007d0| 70 65 73 20 69 6e 20 43 | 20 72 6f 75 74 69 6e 65 |pes in C| routine|
|000007e0| 73 3a 20 0d 31 2e 49 6e | 20 65 76 65 72 79 20 66 |s: .1.In| every f|
|000007f0| 69 6c 65 20 49 20 63 68 | 61 6e 67 65 64 20 22 66 |ile I ch|anged "f|
|00000800| 6c 6f 61 74 22 20 74 6f | 20 22 46 4c 4f 41 54 22 |loat" to| "FLOAT"|
|00000810| 2c 20 61 6e 64 20 23 69 | 6e 63 6c 75 64 65 64 20 |, and #i|ncluded |
|00000820| 6e 72 2e 68 2e 20 49 20 | 69 6e 73 65 72 74 65 64 |nr.h. I |inserted|
|00000830| 20 74 68 65 20 0d 73 74 | 61 74 65 6d 65 6e 74 20 | the .st|atement |
|00000840| 22 74 79 70 65 64 65 66 | 20 64 6f 75 62 6c 65 20 |"typedef| double |
|00000850| 46 4c 4f 41 54 3b 22 20 | 69 6e 20 74 68 65 20 66 |FLOAT;" |in the f|
|00000860| 69 6c 65 20 6e 72 2e 68 | 2e 20 54 68 69 73 20 69 |ile nr.h|. This i|
|00000870| 73 20 62 65 63 61 75 73 | 65 20 74 68 65 20 0d 4d |s becaus|e the .M|
|00000880| 61 63 69 6e 74 6f 73 68 | 20 63 6f 6d 70 75 74 65 |acintosh| compute|
|00000890| 73 20 64 6f 75 62 6c 65 | 73 20 6d 75 63 68 20 66 |s double|s much f|
|000008a0| 61 73 74 65 72 20 74 68 | 61 6e 20 66 6c 6f 61 74 |aster th|an float|
|000008b0| 73 2e 20 49 66 20 79 6f | 75 27 64 20 72 61 74 68 |s. If yo|u'd rath|
|000008c0| 65 72 20 72 75 6e 0d 73 | 6c 6f 77 6c 79 20 74 68 |er run.s|lowly th|
|000008d0| 61 6e 20 6d 6f 64 69 66 | 79 20 79 6f 75 72 20 4e |an modif|y your N|
|000008e0| 75 6d 65 72 69 63 61 6c | 20 52 65 63 69 70 65 73 |umerical| Recipes|
|000008f0| 20 69 6e 20 43 20 66 69 | 6c 65 73 2c 20 74 68 65 | in C fi|les, the|
|00000900| 6e 20 79 6f 75 20 77 69 | 6c 6c 20 6e 65 65 64 20 |n you wi|ll need |
|00000910| 74 6f 20 69 6e 73 65 72 | 74 20 0d 22 74 79 70 65 |to inser|t ."type|
|00000920| 64 65 66 20 66 6c 6f 61 | 74 20 46 4c 4f 41 54 3b |def floa|t FLOAT;|
|00000930| 22 0d 69 6e 20 43 61 6c | 69 62 72 61 74 65 4c 75 |".in Cal|ibrateLu|
|00000940| 6d 69 6e 61 6e 63 65 2e | 63 20 26 20 50 73 79 63 |minance.|c & Psyc|
|00000950| 68 6f 6d 65 74 72 69 63 | 46 69 74 2e 63 20 69 6e |hometric|Fit.c in|
|00000960| 20 6f 72 64 65 72 20 74 | 6f 20 63 6f 6d 70 69 6c | order t|o compil|
|00000970| 65 20 74 68 6f 73 65 20 | 66 69 6c 65 73 2e 0d 54 |e those |files..T|
|00000980| 68 65 20 72 65 73 74 20 | 6f 66 20 74 68 65 20 56 |he rest |of the V|
|00000990| 69 64 65 6f 54 6f 6f 6c | 62 6f 78 20 64 6f 65 73 |ideoTool|box does|
|000009a0| 6e 27 74 20 63 61 72 65 | 2e 0d 32 2e 20 53 65 65 |n't care|..2. See|
|000009b0| 20 74 68 65 20 52 65 61 | 64 20 6d 65 21 20 64 6f | the Rea|d me! do|
|000009c0| 63 75 6d 65 6e 74 20 66 | 6f 72 20 6f 74 68 65 72 |cument f|or other|
|000009d0| 20 63 68 61 6e 67 65 73 | 20 61 6e 64 20 62 75 67 | changes| and bug|
|000009e0| 20 66 69 78 73 2e 0d 2a | 2f 0d 23 69 6e 63 6c 75 | fixs..*|/.#inclu|
|000009f0| 64 65 20 22 56 69 64 65 | 6f 54 6f 6f 6c 62 6f 78 |de "Vide|oToolbox|
|00000a00| 2e 68 22 0d 23 69 6e 63 | 6c 75 64 65 20 22 51 75 |.h".#inc|lude "Qu|
|00000a10| 69 63 6b 33 2e 68 22 0d | 23 69 6e 63 6c 75 64 65 |ick3.h".|#include|
|00000a20| 20 3c 6e 72 2e 68 3e 0d | 0d 23 64 65 66 69 6e 65 | <nr.h>.|.#define|
|00000a30| 20 54 4f 4c 45 52 41 4e | 43 45 20 30 2e 30 30 31 | TOLERAN|CE 0.001|
|00000a40| 09 2f 2a 20 66 72 61 63 | 74 69 6f 6e 61 6c 20 74 |./* frac|tional t|
|00000a50| 6f 6c 65 72 61 6e 63 65 | 20 6f 66 20 6c 6f 67 20 |olerance| of log |
|00000a60| 6c 69 6b 65 6c 69 68 6f | 6f 64 2e 20 4e 6f 74 20 |likeliho|od. Not |
|00000a70| 63 72 69 74 69 63 61 6c | 2e 20 2a 2f 0d 0d 2f 2a |critical|. */../*|
|00000a80| 0d 49 20 68 61 74 65 20 | 67 6c 6f 62 61 6c 20 76 |.I hate |global v|
|00000a90| 61 72 69 61 62 6c 65 73 | 20 62 65 63 61 75 73 65 |ariables| because|
|00000aa0| 20 74 68 65 79 20 68 69 | 64 65 20 74 68 65 20 66 | they hi|de the f|
|00000ab0| 6c 6f 77 20 6f 66 20 69 | 6e 66 6f 72 6d 61 74 69 |low of i|nformati|
|00000ac0| 6f 6e 2e 20 48 6f 77 65 | 76 65 72 2c 0d 73 6f 6d |on. Howe|ver,.som|
|00000ad0| 65 20 73 6f 72 74 20 6f | 66 20 63 6c 75 64 67 65 |e sort o|f cludge|
|00000ae0| 20 69 73 20 6e 65 63 65 | 73 73 61 72 79 20 74 6f | is nece|ssary to|
|00000af0| 20 70 61 73 73 20 74 68 | 65 20 65 78 74 72 61 20 | pass th|e extra |
|00000b00| 61 72 67 75 6d 65 6e 74 | 73 20 74 6f 20 45 72 72 |argument|s to Err|
|00000b10| 6f 72 28 29 2c 20 62 79 | 70 61 73 73 69 6e 67 0d |or(), by|passing.|
|00000b20| 74 68 65 20 4e 75 6d 65 | 72 69 63 61 6c 20 52 65 |the Nume|rical Re|
|00000b30| 63 69 70 65 73 20 72 6f | 75 74 69 6e 65 73 20 74 |cipes ro|utines t|
|00000b40| 68 61 74 20 63 61 6c 6c | 20 69 74 2c 20 73 69 6e |hat call| it, sin|
|00000b50| 63 65 20 74 68 65 79 20 | 6f 6e 6c 79 20 70 61 73 |ce they |only pas|
|00000b60| 73 20 74 68 65 20 0d 70 | 61 72 61 6d 65 74 65 72 |s the .p|arameter|
|00000b70| 73 20 74 68 65 79 20 6b | 6e 6f 77 20 61 62 6f 75 |s they k|now abou|
|00000b80| 74 2e 20 54 68 65 73 65 | 20 73 74 61 74 69 63 20 |t. These| static |
|00000b90| 64 65 63 6c 61 74 69 6f | 6e 73 20 61 74 20 6c 65 |declatio|ns at le|
|00000ba0| 61 73 74 20 72 65 73 74 | 72 69 63 74 20 74 68 65 |ast rest|rict the|
|00000bb0| 20 73 63 6f 70 65 20 6f | 66 0d 74 68 65 73 65 20 | scope o|f.these |
|00000bc0| 22 67 6c 6f 62 61 6c 73 | 22 20 74 6f 20 74 68 69 |"globals|" to thi|
|00000bd0| 73 20 66 69 6c 65 2e 0d | 2a 2f 0d 73 74 61 74 69 |s file..|*/.stati|
|00000be0| 63 20 64 6f 75 62 6c 65 | 20 45 72 72 6f 72 28 46 |c double| Error(F|
|00000bf0| 4c 4f 41 54 20 2a 70 29 | 3b 0d 73 74 61 74 69 63 |LOAT *p)|;.static|
|00000c00| 20 64 61 74 61 52 65 63 | 6f 72 64 20 2a 6d 79 44 | dataRec|ord *myD|
|00000c10| 61 74 61 50 74 72 3b 09 | 09 09 09 2f 2a 20 66 6f |ataPtr;.|.../* fo|
|00000c20| 72 20 45 72 72 6f 72 28 | 29 20 2a 2f 0d 73 74 61 |r Error(|) */.sta|
|00000c30| 74 69 63 20 50 73 79 63 | 68 6f 6d 65 74 72 69 63 |tic Psyc|hometric|
|00000c40| 46 75 6e 63 74 69 6f 6e | 50 74 72 20 4d 79 50 73 |Function|Ptr MyPs|
|00000c50| 79 63 68 46 75 6e 3b 09 | 2f 2a 20 66 6f 72 20 45 |ychFun;.|/* for E|
|00000c60| 72 72 6f 72 28 29 20 2a | 2f 0d 73 74 61 74 69 63 |rror() *|/.static|
|00000c70| 20 70 61 72 61 6d 52 65 | 63 6f 72 64 20 6d 79 50 | paramRe|cord myP|
|00000c80| 61 72 61 6d 73 3b 09 09 | 09 09 2f 2a 20 66 6f 72 |arams;..|../* for|
|00000c90| 20 45 72 72 6f 72 28 29 | 20 2a 2f 0d 73 74 61 74 | Error()| */.stat|
|00000ca0| 69 63 20 69 6e 74 20 6d | 79 44 65 67 72 65 65 73 |ic int m|yDegrees|
|00000cb0| 4f 66 46 72 65 65 64 6f | 6d 3b 09 09 09 09 2f 2a |OfFreedo|m;..../*|
|00000cc0| 20 66 6f 72 20 45 72 72 | 6f 72 28 29 20 2a 2f 0d | for Err|or() */.|
|00000cd0| 73 74 61 74 69 63 20 69 | 6e 74 20 69 74 65 72 3b |static i|nt iter;|
|00000ce0| 09 09 09 09 09 09 09 2f | 2a 20 66 6f 72 20 45 72 |......./|* for Er|
|00000cf0| 72 6f 72 28 29 20 2a 2f | 0d 0d 64 6f 75 62 6c 65 |ror() */|..double|
|00000d00| 20 50 73 79 63 68 6f 6d | 65 74 72 69 63 46 69 74 | Psychom|etricFit|
|00000d10| 28 70 61 72 61 6d 52 65 | 63 6f 72 64 20 2a 70 61 |(paramRe|cord *pa|
|00000d20| 72 61 6d 50 74 72 2c 50 | 73 79 63 68 6f 6d 65 74 |ramPtr,P|sychomet|
|00000d30| 72 69 63 46 75 6e 63 74 | 69 6f 6e 50 74 72 20 50 |ricFunct|ionPtr P|
|00000d40| 73 79 63 68 46 75 6e 0d | 09 2c 64 61 74 61 52 65 |sychFun.|.,dataRe|
|00000d50| 63 6f 72 64 20 2a 64 61 | 74 61 50 74 72 2c 64 6f |cord *da|taPtr,do|
|00000d60| 75 62 6c 65 20 2a 6c 6f | 67 4c 69 6b 65 6c 69 68 |uble *lo|gLikelih|
|00000d70| 6f 6f 64 50 74 72 2c 69 | 6e 74 20 64 65 67 72 65 |oodPtr,i|nt degre|
|00000d80| 65 73 4f 66 46 72 65 65 | 64 6f 6d 0d 09 2c 64 6f |esOfFree|dom..,do|
|00000d90| 75 62 6c 65 20 2a 63 68 | 69 53 71 75 61 72 65 50 |uble *ch|iSquareP|
|00000da0| 74 72 2c 69 6e 74 20 2a | 63 68 69 53 71 75 61 72 |tr,int *|chiSquar|
|00000db0| 65 44 46 50 74 72 29 0d | 7b 0d 09 69 6e 74 20 69 |eDFPtr).|{..int i|
|00000dc0| 2c 6a 3b 0d 09 46 4c 4f | 41 54 20 2a 70 2c 2a 2a |,j;..FLO|AT *p,**|
|00000dd0| 64 69 72 65 63 74 69 6f | 6e 2c 66 74 6f 6c 2c 66 |directio|n,ftol,f|
|00000de0| 72 65 74 3b 0d 09 64 61 | 74 61 52 65 63 6f 72 64 |ret;..da|taRecord|
|00000df0| 20 6d 6f 6e 6f 74 6f 6e | 69 63 44 61 74 61 3b 0d | monoton|icData;.|
|00000e00| 09 64 6f 75 62 6c 65 20 | 6d 6f 6e 6f 74 6f 6e 69 |.double |monotoni|
|00000e10| 63 4c 4c 3b 0d 09 69 6e | 74 20 6d 6f 6e 6f 74 6f |cLL;..in|t monoto|
|00000e20| 6e 69 63 44 46 3b 0d 09 | 64 6f 75 62 6c 65 20 50 |nicDF;..|double P|
|00000e30| 3b 0d 09 0d 09 6d 79 44 | 61 74 61 50 74 72 3d 64 |;....myD|ataPtr=d|
|00000e40| 61 74 61 50 74 72 3b 09 | 09 2f 2a 20 63 6f 70 79 |ataPtr;.|./* copy|
|00000e50| 20 74 68 65 73 65 20 66 | 6f 72 20 75 73 65 20 62 | these f|or use b|
|00000e60| 79 20 45 72 72 6f 72 28 | 29 20 2a 2f 0d 09 4d 79 |y Error(|) */..My|
|00000e70| 50 73 79 63 68 46 75 6e | 3d 50 73 79 63 68 46 75 |PsychFun|=PsychFu|
|00000e80| 6e 3b 0d 09 6d 79 50 61 | 72 61 6d 73 3d 2a 70 61 |n;..myPa|rams=*pa|
|00000e90| 72 61 6d 50 74 72 3b 0d | 09 6d 79 44 65 67 72 65 |ramPtr;.|.myDegre|
|00000ea0| 65 73 4f 66 46 72 65 65 | 64 6f 6d 3d 64 65 67 72 |esOfFree|dom=degr|
|00000eb0| 65 65 73 4f 66 46 72 65 | 65 64 6f 6d 3b 0d 09 0d |eesOfFre|edom;...|
|00000ec0| 09 70 3d 76 65 63 74 6f | 72 28 31 2c 64 65 67 72 |.p=vecto|r(1,degr|
|00000ed0| 65 65 73 4f 66 46 72 65 | 65 64 6f 6d 29 3b 0d 09 |eesOfFre|edom);..|
|00000ee0| 64 69 72 65 63 74 69 6f | 6e 3d 6d 61 74 72 69 78 |directio|n=matrix|
|00000ef0| 28 31 2c 64 65 67 72 65 | 65 73 4f 66 46 72 65 65 |(1,degre|esOfFree|
|00000f00| 64 6f 6d 2c 31 2c 64 65 | 67 72 65 65 73 4f 66 46 |dom,1,de|greesOfF|
|00000f10| 72 65 65 64 6f 6d 29 3b | 09 2f 2a 20 69 6e 69 74 |reedom);|./* init|
|00000f20| 69 61 6c 20 73 65 74 20 | 6f 66 20 64 69 72 65 63 |ial set |of direc|
|00000f30| 74 69 6f 6e 73 20 2a 2f | 0d 09 69 66 28 70 3d 3d |tions */|..if(p==|
|00000f40| 4e 55 4c 4c 20 7c 7c 20 | 64 69 72 65 63 74 69 6f |NULL || |directio|
|00000f50| 6e 20 3d 3d 20 4e 55 4c | 4c 29 20 7b 0d 09 09 50 |n == NUL|L) {...P|
|00000f60| 72 69 6e 74 66 45 78 69 | 74 28 22 50 73 79 63 68 |rintfExi|t("Psych|
|00000f70| 6f 6d 65 74 72 69 63 46 | 69 74 3a 20 6e 6f 74 20 |ometricF|it: not |
|00000f80| 65 6e 6f 75 67 68 20 72 | 6f 6f 6d 20 66 6f 72 20 |enough r|oom for |
|00000f90| 61 72 72 61 79 73 2e 5c | 30 30 37 5c 6e 22 29 3b |arrays.\|007\n");|
|00000fa0| 0d 09 7d 0d 0d 09 66 6f | 72 28 69 3d 31 3b 69 3c |..}...fo|r(i=1;i<|
|00000fb0| 3d 64 65 67 72 65 65 73 | 4f 66 46 72 65 65 64 6f |=degrees|OfFreedo|
|00000fc0| 6d 3b 69 2b 2b 29 20 70 | 5b 69 5d 3d 28 28 64 6f |m;i++) p|[i]=((do|
|00000fd0| 75 62 6c 65 20 2a 29 70 | 61 72 61 6d 50 74 72 29 |uble *)p|aramPtr)|
|00000fe0| 5b 69 2d 31 5d 3b 0d 09 | 66 6f 72 28 69 3d 31 3b |[i-1];..|for(i=1;|
|00000ff0| 69 3c 3d 64 65 67 72 65 | 65 73 4f 66 46 72 65 65 |i<=degre|esOfFree|
|00001000| 64 6f 6d 3b 69 2b 2b 29 | 66 6f 72 28 6a 3d 31 3b |dom;i++)|for(j=1;|
|00001010| 6a 3c 3d 64 65 67 72 65 | 65 73 4f 66 46 72 65 65 |j<=degre|esOfFree|
|00001020| 64 6f 6d 3b 6a 2b 2b 29 | 64 69 72 65 63 74 69 6f |dom;j++)|directio|
|00001030| 6e 5b 69 5d 5b 6a 5d 3d | 30 2e 30 3b 0d 09 66 6f |n[i][j]=|0.0;..fo|
|00001040| 72 28 69 3d 31 3b 69 3c | 3d 64 65 67 72 65 65 73 |r(i=1;i<|=degrees|
|00001050| 4f 66 46 72 65 65 64 6f | 6d 3b 69 2b 2b 29 64 69 |OfFreedo|m;i++)di|
|00001060| 72 65 63 74 69 6f 6e 5b | 69 5d 5b 69 5d 3d 30 2e |rection[|i][i]=0.|
|00001070| 30 33 3b 09 2f 2a 20 69 | 6e 69 74 69 61 6c 20 73 |03;./* i|nitial s|
|00001080| 74 65 70 20 73 69 7a 65 | 20 2a 2f 0d 09 66 74 6f |tep size| */..fto|
|00001090| 6c 3d 54 4f 4c 45 52 41 | 4e 43 45 3b 09 2f 2a 20 |l=TOLERA|NCE;./* |
|000010a0| 66 72 61 63 74 69 6f 6e | 61 6c 20 74 6f 6c 65 72 |fraction|al toler|
|000010b0| 61 6e 63 65 20 6f 6e 20 | 45 72 72 6f 72 20 76 61 |ance on |Error va|
|000010c0| 6c 75 65 20 77 68 65 6e | 20 64 6f 6e 65 20 2a 2f |lue when| done */|
|000010d0| 0d 09 69 74 65 72 3d 30 | 3b 0d 09 0d 09 2f 2a 20 |..iter=0|;..../* |
|000010e0| 64 6f 20 69 74 2e 20 54 | 68 65 20 70 73 79 63 68 |do it. T|he psych|
|000010f0| 6f 6d 74 72 69 63 20 66 | 75 6e 63 74 69 6f 6e 20 |omtric f|unction |
|00001100| 69 73 20 70 61 73 73 65 | 64 20 74 6f 20 45 72 72 |is passe|d to Err|
|00001110| 6f 72 20 62 79 20 74 68 | 65 20 67 6c 6f 62 61 6c |or by th|e global|
|00001120| 20 4d 79 50 73 79 63 68 | 46 75 6e 20 2a 2f 0d 09 | MyPsych|Fun */..|
|00001130| 69 66 28 64 65 67 72 65 | 65 73 4f 66 46 72 65 65 |if(degre|esOfFree|
|00001140| 64 6f 6d 3d 3d 30 29 20 | 66 72 65 74 20 3d 20 45 |dom==0) |fret = E|
|00001150| 72 72 6f 72 28 70 29 3b | 0d 09 65 6c 73 65 20 70 |rror(p);|..else p|
|00001160| 6f 77 65 6c 6c 28 70 2c | 64 69 72 65 63 74 69 6f |owell(p,|directio|
|00001170| 6e 2c 64 65 67 72 65 65 | 73 4f 66 46 72 65 65 64 |n,degree|sOfFreed|
|00001180| 6f 6d 2c 66 74 6f 6c 2c | 26 69 74 65 72 2c 26 66 |om,ftol,|&iter,&f|
|00001190| 72 65 74 2c 26 45 72 72 | 6f 72 29 3b 0d 0d 09 66 |ret,&Err|or);...f|
|000011a0| 6f 72 28 69 3d 31 3b 69 | 3c 3d 64 65 67 72 65 65 |or(i=1;i|<=degree|
|000011b0| 73 4f 66 46 72 65 65 64 | 6f 6d 3b 69 2b 2b 29 20 |sOfFreed|om;i++) |
|000011c0| 28 28 64 6f 75 62 6c 65 | 20 2a 29 70 61 72 61 6d |((double| *)param|
|000011d0| 50 74 72 29 5b 69 2d 31 | 5d 3d 70 5b 69 5d 3b 0d |Ptr)[i-1|]=p[i];.|
|000011e0| 09 66 72 65 65 5f 6d 61 | 74 72 69 78 28 64 69 72 |.free_ma|trix(dir|
|000011f0| 65 63 74 69 6f 6e 2c 31 | 2c 64 65 67 72 65 65 73 |ection,1|,degrees|
|00001200| 4f 66 46 72 65 65 64 6f | 6d 2c 31 2c 64 65 67 72 |OfFreedo|m,1,degr|
|00001210| 65 65 73 4f 66 46 72 65 | 65 64 6f 6d 29 3b 0d 09 |eesOfFre|edom);..|
|00001220| 66 72 65 65 5f 76 65 63 | 74 6f 72 28 70 2c 31 2c |free_vec|tor(p,1,|
|00001230| 64 65 67 72 65 65 73 4f | 66 46 72 65 65 64 6f 6d |degreesO|fFreedom|
|00001240| 29 3b 0d 0d 09 2a 6c 6f | 67 4c 69 6b 65 6c 69 68 |);...*lo|gLikelih|
|00001250| 6f 6f 64 50 74 72 20 3d | 20 2d 66 72 65 74 3b 0d |oodPtr =| -fret;.|
|00001260| 09 0d 09 2f 2a 20 4e 6f | 77 20 63 6f 6d 70 75 74 |.../* No|w comput|
|00001270| 65 20 74 68 65 20 64 65 | 67 72 65 65 20 6f 66 20 |e the de|gree of |
|00001280| 73 69 67 6e 69 66 69 63 | 61 6e 63 65 20 61 74 20 |signific|ance at |
|00001290| 77 68 69 63 68 20 74 68 | 65 20 66 69 74 20 63 61 |which th|e fit ca|
|000012a0| 6e 20 62 65 20 72 65 6a | 65 63 74 65 64 20 2a 2f |n be rej|ected */|
|000012b0| 0d 09 6d 6f 6e 6f 74 6f | 6e 69 63 44 61 74 61 3d |..monoto|nicData=|
|000012c0| 20 2a 64 61 74 61 50 74 | 72 3b 0d 09 4d 6f 6e 6f | *dataPt|r;..Mono|
|000012d0| 74 6f 6e 69 63 46 69 74 | 28 26 6d 6f 6e 6f 74 6f |tonicFit|(&monoto|
|000012e0| 6e 69 63 44 61 74 61 2c | 26 6d 6f 6e 6f 74 6f 6e |nicData,|&monoton|
|000012f0| 69 63 4c 4c 2c 26 6d 6f | 6e 6f 74 6f 6e 69 63 44 |icLL,&mo|notonicD|
|00001300| 46 29 3b 09 2f 2a 20 6f | 76 65 72 77 72 69 74 65 |F);./* o|verwrite|
|00001310| 73 20 64 61 74 61 20 77 | 69 74 68 20 66 69 74 20 |s data w|ith fit |
|00001320| 2a 2f 0d 09 2a 63 68 69 | 53 71 75 61 72 65 50 74 |*/..*chi|SquarePt|
|00001330| 72 3d 20 2d 32 2e 30 2a | 28 2a 6c 6f 67 4c 69 6b |r= -2.0*|(*logLik|
|00001340| 65 6c 69 68 6f 6f 64 50 | 74 72 2d 6d 6f 6e 6f 74 |elihoodP|tr-monot|
|00001350| 6f 6e 69 63 4c 4c 29 3b | 09 2f 2a 20 2d 32 20 6c |onicLL);|./* -2 l|
|00001360| 6f 67 20 6c 69 6b 65 6c | 69 68 6f 6f 64 20 72 61 |og likel|ihood ra|
|00001370| 74 69 6f 20 6f 66 20 68 | 79 70 6f 74 68 65 73 65 |tio of h|ypothese|
|00001380| 73 20 2a 2f 0d 09 2a 63 | 68 69 53 71 75 61 72 65 |s */..*c|hiSquare|
|00001390| 44 46 50 74 72 3d 6d 6f | 6e 6f 74 6f 6e 69 63 44 |DFPtr=mo|notonicD|
|000013a0| 46 2d 64 65 67 72 65 65 | 73 4f 66 46 72 65 65 64 |F-degree|sOfFreed|
|000013b0| 6f 6d 3b 09 09 09 2f 2a | 20 64 69 66 66 65 72 65 |om;.../*| differe|
|000013c0| 6e 63 65 20 69 6e 20 64 | 65 67 72 65 65 73 20 6f |nce in d|egrees o|
|000013d0| 66 20 66 72 65 65 64 6f | 6d 20 2a 2f 0d 09 50 3d |f freedo|m */..P=|
|000013e0| 50 43 68 69 53 71 75 61 | 72 65 28 2a 63 68 69 53 |PChiSqua|re(*chiS|
|000013f0| 71 75 61 72 65 50 74 72 | 2c 2a 63 68 69 53 71 75 |quarePtr|,*chiSqu|
|00001400| 61 72 65 44 46 50 74 72 | 29 3b 09 09 09 2f 2a 20 |areDFPtr|);.../* |
|00001410| 73 69 67 6e 69 66 69 63 | 61 6e 63 65 20 2a 2f 0d |signific|ance */.|
|00001420| 09 72 65 74 75 72 6e 20 | 50 3b 0d 7d 0d 0d 2f 2a |.return |P;.}../*|
|00001430| 20 54 68 65 72 65 20 69 | 73 20 61 20 73 75 62 74 | There i|s a subt|
|00001440| 6c 65 74 79 20 68 65 72 | 65 2e 20 49 20 74 68 6f |lety her|e. I tho|
|00001450| 75 67 68 74 20 74 68 61 | 74 20 49 20 63 6f 75 6c |ught tha|t I coul|
|00001460| 64 20 75 73 65 20 50 6f | 77 65 6c 6c 20 77 69 74 |d use Po|well wit|
|00001470| 68 20 74 68 65 20 77 68 | 6f 6c 65 0d 70 61 72 61 |h the wh|ole.para|
|00001480| 6d 52 65 63 6f 72 64 2c | 20 79 65 74 20 61 73 6b |mRecord,| yet ask|
|00001490| 20 50 6f 77 65 6c 6c 20 | 74 6f 20 6f 6e 6c 79 20 | Powell |to only |
|000014a0| 74 77 69 64 64 6c 65 20 | 74 68 65 20 66 69 72 73 |twiddle |the firs|
|000014b0| 74 20 66 65 77 20 70 61 | 72 61 6d 65 74 65 72 73 |t few pa|rameters|
|000014c0| 2c 20 66 69 67 75 72 69 | 6e 67 20 74 68 61 74 0d |, figuri|ng that.|
|000014d0| 65 76 65 6e 20 77 68 65 | 6e 20 49 20 77 61 73 20 |even whe|n I was |
|000014e0| 61 73 6b 69 6e 67 20 50 | 6f 77 65 6c 6c 20 74 6f |asking P|owell to|
|000014f0| 20 66 69 74 20 6f 6e 6c | 79 20 74 68 65 20 66 69 | fit onl|y the fi|
|00001500| 72 73 74 20 66 65 77 20 | 70 61 72 61 6d 65 74 65 |rst few |paramete|
|00001510| 72 73 20 74 68 65 20 6f | 74 68 65 72 0d 70 61 72 |rs the o|ther.par|
|00001520| 61 6d 65 74 65 72 73 20 | 77 6f 75 6c 64 20 73 74 |ameters |would st|
|00001530| 69 6c 6c 20 62 65 20 74 | 68 65 72 65 20 69 6e 20 |ill be t|here in |
|00001540| 74 68 65 20 61 72 72 61 | 79 20 77 68 65 6e 20 74 |the arra|y when t|
|00001550| 68 65 20 70 6f 69 6e 74 | 65 72 20 74 6f 20 74 68 |he point|er to th|
|00001560| 65 20 61 72 72 61 79 20 | 77 61 73 0d 70 61 73 73 |e array |was.pass|
|00001570| 65 64 20 74 6f 20 45 72 | 72 6f 72 28 29 2e 20 41 |ed to Er|ror(). A|
|00001580| 6c 61 73 2c 20 50 6f 77 | 65 6c 6c 28 29 20 61 6e |las, Pow|ell() an|
|00001590| 64 20 69 74 73 20 73 75 | 62 72 6f 75 74 69 6e 65 |d its su|broutine|
|000015a0| 73 20 6d 61 6b 65 20 43 | 4f 50 49 45 53 20 6f 66 |s make C|OPIES of|
|000015b0| 20 74 68 65 20 61 72 72 | 61 79 2c 0d 61 6e 64 20 | the arr|ay,.and |
|000015c0| 6e 61 74 75 72 61 6c 6c | 79 20 66 61 69 6c 20 74 |naturall|y fail t|
|000015d0| 6f 20 63 6f 70 79 20 74 | 68 65 20 6e 6f 6e 2d 74 |o copy t|he non-t|
|000015e0| 77 69 64 64 6c 65 64 20 | 70 61 72 61 6d 65 74 65 |widdled |paramete|
|000015f0| 72 73 2c 20 73 69 6e 63 | 65 20 74 68 65 79 20 64 |rs, sinc|e they d|
|00001600| 6f 6e 27 74 20 6b 6e 6f | 77 20 61 62 6f 75 74 0d |on't kno|w about.|
|00001610| 74 68 65 6d 2e 20 54 68 | 65 20 73 6f 6c 75 74 69 |them. Th|e soluti|
|00001620| 6f 6e 20 69 73 20 66 6f | 72 20 45 72 72 6f 72 28 |on is fo|r Error(|
|00001630| 29 20 74 6f 20 68 61 76 | 65 20 69 74 73 20 6f 77 |) to hav|e its ow|
|00001640| 6e 20 63 6f 6d 70 6c 65 | 74 65 20 63 6f 70 79 20 |n comple|te copy |
|00001650| 6f 66 20 74 68 65 20 70 | 61 72 61 6d 52 65 63 6f |of the p|aramReco|
|00001660| 72 64 2e 0d 45 61 63 68 | 20 74 69 6d 65 20 45 72 |rd..Each| time Er|
|00001670| 72 6f 72 28 29 20 69 73 | 20 63 61 6c 6c 65 64 20 |ror() is| called |
|00001680| 69 74 20 75 70 64 61 74 | 65 73 20 74 68 65 20 74 |it updat|es the t|
|00001690| 77 69 64 64 6c 65 64 20 | 70 61 72 61 6d 65 74 65 |widdled |paramete|
|000016a0| 72 73 20 62 65 66 6f 72 | 65 20 63 61 6c 6c 69 6e |rs befor|e callin|
|000016b0| 67 0d 4c 6f 67 4c 69 6b | 65 6c 69 68 6f 6f 64 28 |g.LogLik|elihood(|
|000016c0| 29 2c 20 77 68 69 63 68 | 20 63 61 6c 6c 73 20 74 |), which| calls t|
|000016d0| 68 65 20 70 73 79 63 68 | 6f 6d 65 74 72 69 63 20 |he psych|ometric |
|000016e0| 66 75 6e 63 74 69 6f 6e | 20 28 2a 4d 79 50 73 79 |function| (*MyPsy|
|000016f0| 63 68 46 75 6e 29 28 29 | 2e 0d 2a 2f 0d 0d 64 6f |chFun)()|..*/..do|
|00001700| 75 62 6c 65 20 45 72 72 | 6f 72 28 46 4c 4f 41 54 |uble Err|or(FLOAT|
|00001710| 20 2a 70 29 0d 7b 0d 09 | 64 6f 75 62 6c 65 20 65 | *p).{..|double e|
|00001720| 72 72 6f 72 3b 0d 09 69 | 6e 74 20 69 3b 0d 09 73 |rror;..i|nt i;..s|
|00001730| 74 61 74 69 63 20 69 6e | 74 20 6c 61 73 74 49 74 |tatic in|t lastIt|
|00001740| 65 72 3d 30 3b 0d 09 0d | 09 66 6f 72 28 69 3d 31 |er=0;...|.for(i=1|
|00001750| 3b 69 3c 3d 6d 79 44 65 | 67 72 65 65 73 4f 66 46 |;i<=myDe|greesOfF|
|00001760| 72 65 65 64 6f 6d 3b 69 | 2b 2b 29 20 28 28 64 6f |reedom;i|++) ((do|
|00001770| 75 62 6c 65 20 2a 29 26 | 6d 79 50 61 72 61 6d 73 |uble *)&|myParams|
|00001780| 29 5b 69 2d 31 5d 3d 70 | 5b 69 5d 3b 0d 09 0d 09 |)[i-1]=p|[i];....|
|00001790| 65 72 72 6f 72 20 3d 20 | 2d 4c 6f 67 4c 69 6b 65 |error = |-LogLike|
|000017a0| 6c 69 68 6f 6f 64 28 6d | 79 44 61 74 61 50 74 72 |lihood(m|yDataPtr|
|000017b0| 2c 26 6d 79 50 61 72 61 | 6d 73 2c 4d 79 50 73 79 |,&myPara|ms,MyPsy|
|000017c0| 63 68 46 75 6e 29 3b 0d | 09 0d 09 2f 2a 20 44 69 |chFun);.|.../* Di|
|000017d0| 61 67 6e 6f 73 74 69 63 | 20 70 72 69 6e 74 6f 75 |agnostic| printou|
|000017e0| 74 20 66 6f 72 20 64 69 | 66 66 69 63 75 6c 74 20 |t for di|fficult |
|000017f0| 63 61 73 65 73 20 2a 2f | 0d 09 69 66 28 69 74 65 |cases */|..if(ite|
|00001800| 72 3e 30 20 26 26 20 69 | 74 65 72 25 35 30 20 3d |r>0 && i|ter%50 =|
|00001810| 3d 20 30 20 26 26 20 69 | 74 65 72 21 3d 6c 61 73 |= 0 && i|ter!=las|
|00001820| 74 49 74 65 72 29 7b 0d | 09 09 70 72 69 6e 74 66 |tIter){.|..printf|
|00001830| 28 22 45 72 72 6f 72 28 | 29 3a 20 57 61 72 6e 69 |("Error(|): Warni|
|00001840| 6e 67 2c 20 25 64 20 69 | 74 65 72 61 74 69 6f 6e |ng, %d i|teration|
|00001850| 73 3a 5c 6e 22 2c 69 74 | 65 72 29 3b 0d 09 09 70 |s:\n",it|er);...p|
|00001860| 72 69 6e 74 66 28 22 6c | 6f 67 41 6c 70 68 61 20 |rintf("l|ogAlpha |
|00001870| 25 35 2e 32 66 2c 20 62 | 65 74 61 20 25 35 2e 31 |%5.2f, b|eta %5.1|
|00001880| 66 2c 20 67 61 6d 6d 61 | 20 25 35 2e 32 66 2c 20 |f, gamma| %5.2f, |
|00001890| 64 65 6c 74 61 20 25 36 | 2e 33 66 20 2d 6c 6f 67 |delta %6|.3f -log|
|000018a0| 20 6c 69 6b 65 6c 69 68 | 6f 6f 64 20 25 39 2e 30 | likelih|ood %9.0|
|000018b0| 67 5c 6e 22 2c 6d 79 50 | 61 72 61 6d 73 2e 6c 6f |g\n",myP|arams.lo|
|000018c0| 67 41 6c 70 68 61 2c 6d | 79 50 61 72 61 6d 73 2e |gAlpha,m|yParams.|
|000018d0| 62 65 74 61 2c 6d 79 50 | 61 72 61 6d 73 2e 67 61 |beta,myP|arams.ga|
|000018e0| 6d 6d 61 2c 6d 79 50 61 | 72 61 6d 73 2e 64 65 6c |mma,myPa|rams.del|
|000018f0| 74 61 2c 65 72 72 6f 72 | 29 3b 0d 09 09 6c 61 73 |ta,error|);...las|
|00001900| 74 49 74 65 72 3d 69 74 | 65 72 3b 0d 09 7d 0d 09 |tIter=it|er;..}..|
|00001910| 72 65 74 75 72 6e 20 65 | 72 72 6f 72 3b 0d 7d 0d |return e|rror;.}.|
|00001920| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001980| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00001990| 0d 09 63 68 69 53 71 75 | 61 72 65 44 46 3d 6d 6f |..chiSqu|areDF=mo|
|000019a0| 6e 6f 74 6f 6e 69 63 44 | 46 2d 64 65 67 72 65 65 |notonicD|F-degree|
|000019b0| 11 50 73 79 63 68 6f 6d | 65 74 72 69 63 46 69 74 |.Psychom|etricFit|
|000019c0| 2e 63 02 00 00 00 54 45 | 58 54 4b 41 48 4c 00 00 |.c....TE|XTKAHL..|
|000019d0| 00 00 54 45 58 54 4b 41 | 48 4c 00 00 00 00 00 00 |..TEXTKA|HL......|
|000019e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 00 00 a7 e5 d5 a1 00 00 | 00 00 00 00 01 7e 68 69 |........|.....~hi|
|00001a00| 53 71 75 61 72 65 44 46 | 29 3b 09 09 09 09 2f 2a |SquareDF|);..../*|
|00001a10| 20 73 69 67 6e 69 66 69 | 63 61 6e 63 65 20 2a 2f | signifi|cance */|
|00001a20| 0d 09 72 65 74 75 72 6e | 20 50 3b 0d 7d 0d 0d 2f |..return| P;.}../|
|00001a30| 2a 20 54 68 65 72 65 20 | 69 73 20 61 20 73 75 62 |* There |is a sub|
|00001a40| 74 6c 65 74 79 20 68 65 | 72 65 2e 20 49 20 74 68 |tlety he|re. I th|
|00001a50| 6f 75 67 68 74 20 74 68 | 61 74 20 49 20 63 6f 75 |ought th|at I cou|
|00001a60| 6c 64 20 75 73 65 20 50 | 6f 77 65 6c 6c 20 77 69 |ld use P|owell wi|
|00001a70| 74 68 20 74 68 65 20 77 | 68 6f 6c 65 20 70 61 72 |th the w|hole par|
|00001a80| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 0b 01 6b |...H..Mo|naco...k|
|00001a90| 01 0b 01 71 00 00 00 00 | 00 00 00 00 00 00 00 00 |...q....|........|
|00001aa0| 00 00 00 00 00 00 00 06 | 00 04 00 3c 00 24 01 dd |........|...<.$..|
|00001ab0| 02 3d 00 3c 00 24 01 dd | 02 3d a2 44 18 82 00 00 |.=.<.$..|.=.D....|
|00001ac0| 07 da 00 00 07 da 00 00 | 05 db 01 00 00 00 01 00 |........|........|
|00001ad0| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 60 e4 1c |...L...L|...2.`..|
|00001ae0| 0c dc 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|00001af0| 00 0a 03 ed ff ff 00 00 | 00 00 00 62 8a 54 00 00 |........|...b.T..|
+--------+-------------------------+-------------------------+--------+--------+